<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>.: INPUT DATA :.</title>
<!-- Memanggil file layout.css -->
<script language="javascript" src="calendar/calendar.js"></script>

</head>

<body>
<?php 
require_once('calendar/classes/tc_calendar.php');
include "konek.php"; // untuk memanggil koneksi
$PeritahSql="SELECT * FROM SDM";
$Query = oci_parse($koneksi,$PeritahSql); 
oci_execute($Query);
?>

<form id="form1" name="form1" method="post" action="proses_indata.php">
<table width="100%" border="0">
  <tr>
    <td>&nbsp;</td>
    <td width="17%">&nbsp;</td>
    <td width="2%">&nbsp;</td>
    <td width="36%">&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td width="17%">&nbsp;</td>
    <td colspan="3"><strong>FORM INPUT DATA</strong></td>
    <td width="45%">&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>EMP ID</td>
    <td>
</td>
    <td><label>
      <input name="empno" type="text" id="empno" size="20" />
    </label></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>EMP NAME</td>
    <td>&nbsp;</td>
    <td><input name="empname" type="text" id="empname" size="60" /></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>JOB</td>
    <td>&nbsp;</td>
    <td><input name="job" type="text" id="job" size="60" /></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>HIRE DATE</td>
    <td>&nbsp;</td>
    <td><?php
					  $myCalendar = new tc_calendar("date", true);
					  $myCalendar->setIcon("calendar/images/iconCalendar.gif");
					  $myCalendar->setDate(date('d'), date('m'), date('Y'));
					  $myCalendar->setPath("calendar/");
					  $myCalendar->setYearInterval(1960, 2015);
					  $myCalendar->writeScript();
					  ?></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>SALARY</td>
    <td>&nbsp;</td>
    <td><input type="text" name="salary" id="salary" /></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>DEPT</td>
    <td>&nbsp;</td>
    <td><label>
    <select name="dept" id="dept">
    <?php
    while (oci_fetch_array($Query)){
	echo "<option value=".ociresult($Query,"JABATAN").">".ociresult($Query,"NAMA_JABATAN")."</option>";
	}
	?>
    </select>
    </label></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><label>
      <input type="submit" name="simpan" id="simpan" value="Save" />
    </label>
    <label>
    <input type=button onClick="location.href='tampil_data.php'" value='Browse Data'>
    </label>
    
    </td>
    <td>&nbsp;</td>
  </tr>
</table>
    </form>
    
</body>
</html>